package com.shuhe.common;

import java.util.HashMap;

/**
 * 中国车牌
 *
 * @author dazer
 */
public class ChineseCarNumber {

    private static final HashMap<Integer, String> CHINESE_CAR_CODE = new HashMap<Integer, String>();

    static {
        CHINESE_CAR_CODE.put(1, "京");
        CHINESE_CAR_CODE.put(2, "津");
        CHINESE_CAR_CODE.put(3, "冀");
        CHINESE_CAR_CODE.put(4, "晋");
        CHINESE_CAR_CODE.put(5, "蒙");
        CHINESE_CAR_CODE.put(6, "辽");
        CHINESE_CAR_CODE.put(7, "吉");
        CHINESE_CAR_CODE.put(8, "黑");
        CHINESE_CAR_CODE.put(9, "沪");
        CHINESE_CAR_CODE.put(10, "苏");
        CHINESE_CAR_CODE.put(11, "浙");
        CHINESE_CAR_CODE.put(12, "皖");
        CHINESE_CAR_CODE.put(13, "闽");
        CHINESE_CAR_CODE.put(14, "赣");
        CHINESE_CAR_CODE.put(15, "鲁");
        CHINESE_CAR_CODE.put(16, "豫");
        CHINESE_CAR_CODE.put(17, "鄂");
        CHINESE_CAR_CODE.put(18, "湘");
        CHINESE_CAR_CODE.put(19, "粤");
        CHINESE_CAR_CODE.put(20, "桂");
        CHINESE_CAR_CODE.put(21, "琼");
        CHINESE_CAR_CODE.put(22, "港");
        CHINESE_CAR_CODE.put(23, "澳");
        CHINESE_CAR_CODE.put(24, "渝");
        CHINESE_CAR_CODE.put(25, "川");
        CHINESE_CAR_CODE.put(26, "贵");
        CHINESE_CAR_CODE.put(27, "云");
        CHINESE_CAR_CODE.put(28, "藏");
        CHINESE_CAR_CODE.put(29, "陕");
        CHINESE_CAR_CODE.put(30, "甘");
        CHINESE_CAR_CODE.put(31, "青");
        CHINESE_CAR_CODE.put(32, "宁");
        CHINESE_CAR_CODE.put(33, "新");
        CHINESE_CAR_CODE.put(34, "台");
    }


    public static String getCarCode(String carName) {

        for (String value : CHINESE_CAR_CODE.values()) {
            if (value.equals(carName)) {
                return value;
            }
        }
        return "";
    }
}

